#define  _CRT_SECURE_NO_WARNINGS 1

//#include<bits/stdc++.h>
//#define sd(n) scanf("%d",&n) 
//#define sld(n) scanf("%lld",&n)
//#define pd(n) printf("%d", (n))
//#define pld(n) printf("%lld", n)
//#define all(x) (x).begin(),(x).end()
//#define rall(x) (x).rbegin(),(x).rend()
//const int N = 2e5;
//const int maxn = 1e6;
//typedef long long int ll;
//using namespace std;
////----------------------------------------------------------------------------//
//
//void solve()
//{
//
//}
//
//int main()
//{
//	int T;
//	sd(T);
//	while (T--)
//	{
//		solve();
//	}
//	return 0;
//}


#include<bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
const int N = 2e5 + 10;
#define INF 0x3f3f3f3f;
typedef long long int ll;
#define close(); std::ios::sync_with_stdio(false);cin.tie(0),cout.tie(0);
//----------------------------------------------------------------------------//
int n;
int a[60];
void solve()
{
	cin >> n;

	int sum = 0;
	bool e = false;
	bool m = false;
	for (int i = 0; i < n; i++)
	{
		cin >> a[i];
		while (a[i] > 1)
		{
			sum += a[i] / 2;
			a[i] %= 2;
		}

	}

	if (sum == 0)
	{
		cout << "maomao90" << '\n';
		return;
	}

	if (sum & 1) cout << "errorgorn" << '\n';
	else cout << "maomao90" << '\n';



	// if(n%2!=0) cout<<"errorgorn"<<'\n';
	// else cout<<"maomao90"<<'\n';
}

int main()
{
	close();
	int T; cin >> T;
	while (T--) solve();
	return 0;
}